package com.yy.hi.app;

import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.yy.hi.app.demo.tab.HiTabBottomDemoActivity;
import com.yy.hi.ui.tab.bottom.HiTabBottom;
import com.yy.hi.ui.tab.bottom.HiTabBottomInfo;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    private HiTabBottom mHiTabBottom;
    private HiTabBottomInfo mHiTabBottomInfo;
    // private TextView tvFace;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.btn).setOnClickListener(this);
        // tvFace = findViewById(R.id.tvFace);
        mHiTabBottom = findViewById(R.id.home);
        mHiTabBottomInfo = new HiTabBottomInfo<>("首页", "fonts/iconfont.ttf",
                getString(R.string.if_home), null, "#ff656667", "#ffd44949");
        mHiTabBottom.setHiTabInfo(mHiTabBottomInfo);
        // Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/iconfont.ttf");
        // tvFace.setTypeface(typeface);
        // tvFace.setText(getString(R.string.if_home));
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn:
                startActivity(new Intent(this, HiTabBottomDemoActivity.class));
                break;
        }
    }
}
